title {CSG operators by example}
units mm
attr set {_GLOBAL}
put {subtraction} comb region no tree {- {l grnsph.r} {l redehy.r {1 0 0 750  0 1 0 0  0 0 1 0  0 0 0 1}}}
put {operators} comb region no tree {u {u {l opcolumn1} {l opcolumn2 {0.309017 0.951057 1.97215e-31 3000  -0.951057 0.309017 -7.21645e-16 0  -8.44708e-16 2.74462e-16 1 0  0 0 0 1}}} {u {l opcolumn3 {-0.809017 0.587785 0 6000  -0.587785 -0.809017 0 0  0 0 1 0  0 0 0 1}} {l opcolumn4 {-0.809017 -0.587785 0 9000  0.587785 -0.809017 0 0  0 0 1 0  0 0 0 1}}}}
put {ehy} ehy V {0 0 -500} H {0 0 1500} A {0 1 0} r_1 1000 r_2 1000 c 1
put {sph} ell V {0 0 0} A {1000 0 0} B {0 1000 0} C {0 0 1000}
put {union} comb region no tree {u {- {l grnsph.r} {l redehy.r {1 0 0 750  0 1 0 0  0 0 1 0  0 0 0 1}}} {l redehy.r {1 0 0 750  0 1 0 0  0 0 1 0  0 0 0 1}}}
put {subtraction_r} comb region no tree {- {l redehy.r {1 0 0 750  0 1 0 0  0 0 1 0  0 0 0 1}} {l grnsph.r}}
put {grnsph.r} comb region yes tree {l sph}
attr set {grnsph.r} {region} {R} {region_id} {1001} {material_id} {1} {los} {100} {rgb} {0/255/0} {oshader} {plastic}
put {redehy.r} comb region yes tree {l ehy}
attr set {redehy.r} {region} {R} {region_id} {1000} {material_id} {1} {los} {100} {rgb} {255/0/0} {oshader} {plastic}
put {opcolumn4} comb region no tree {u {u {l union} {l intersection {1 0 0 0  0 1 0 0  0 0 1 -2500  0 0 0 1}}} {u {l subtraction {1 0 0 0  0 1 0 0  0 0 1 -5000  0 0 0 1}} {l subtraction_r {1 0 0 0  0 1 0 0  0 0 1 -7500  0 0 0 1}}}}
put {opcolumn3} comb region no tree {u {u {l union} {l intersection {1 0 0 0  0 1 0 0  0 0 1 -2500  0 0 0 1}}} {u {l subtraction {1 0 0 0  0 1 0 0  0 0 1 -5000  0 0 0 1}} {l subtraction_r {1 0 0 0  0 1 0 0  0 0 1 -7500  0 0 0 1}}}}
put {opcolumn2} comb region no tree {u {u {l union} {l intersection {1 0 0 0  0 1 0 0  0 0 1 -2500  0 0 0 1}}} {u {l subtraction {1 0 0 0  0 1 0 0  0 0 1 -5000  0 0 0 1}} {l subtraction_r {1 0 0 0  0 1 0 0  0 0 1 -7500  0 0 0 1}}}}
put {opcolumn1} comb region no tree {u {u {l union} {l intersection {1 0 0 0  0 1 0 0  0 0 1 -2500  0 0 0 1}}} {u {l subtraction {1 0 0 0  0 1 0 0  0 0 1 -5000  0 0 0 1}} {l subtraction_r {1 0 0 0  0 1 0 0  0 0 1 -7500  0 0 0 1}}}}
put {intersection} comb region no tree {n {l grnsph.r} {l redehy.r {1 0 0 750  0 1 0 0  0 0 1 0  0 0 0 1}}}
attr set {intersection} {rgb} {255/255/0} {inherit} {1}
